package com.cskaoyan.controller.stage;

import com.cskaoyan.model.vo.BaseRespVO;
import com.cskaoyan.model.vo.WxCatalogIndexVO;
import com.cskaoyan.service.WxCatalogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：王李轶群
 * @description：TODO
 * @date ：5/9/22 8:24 PM
 */
@RestController
@RequestMapping("wx/catalog")
public class WxCatalogController {
    @Autowired
    WxCatalogService wxCatalogService;

    @GetMapping("index")
    public BaseRespVO<WxCatalogIndexVO> catalogIndex(){
        BaseRespVO<WxCatalogIndexVO> wxCatalogIndexVOBaseRespVO = wxCatalogService.catalogIndex();
        return wxCatalogIndexVOBaseRespVO;
    }

    @GetMapping("current")
    public BaseRespVO<WxCatalogIndexVO> catalogCurrent(Integer id){
        BaseRespVO<WxCatalogIndexVO> wxCatalogIndexVOBaseRespVO = wxCatalogService.catalogCurrent(id);
        return wxCatalogIndexVOBaseRespVO;
    }
}
